<!--
 * @Description: 呼吸灯
 * @Author: zzj
 * @Date: 2021-08-18 21:34:34
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-18 21:36:33
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>呼吸灯</title>
  <style>
    div {
      box-sizing: border-box;
    }
    .container {
      width: 300px;
      height: 500px;
      background-color: #999;
      margin: 0 auto;
    }
    .box {
      height: 300px;
      padding: 30px;
      background-color: #666;
      animation: move_outer 6s linear infinite;
    }
    .box .circle {
      height: 100%;
      border-radius: 50%;
    }
    .box > .outer {
      border: 5px solid #ccc;
      padding: 40px;
      
      animation: move_inner 6s linear infinite;
    }
    .box > .outer > .inner {
      border: 8px solid #f4f4f4;
    }

    @keyframes move_outer {
      20% {
        padding:20px
      }
      40% {
        padding: 30px;
      }
    }

    @keyframes move_inner {
      20% ,70%{
        padding: 50px;
      }
      40% ,100%{
        padding: 40px;
      }
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="box">
      <div class="outer circle">
        <div class="inner circle"></div>
      </div>
    </div>
  </div>
</body>
</html>